<!DOCTYPE html>
<html>
<head lang="zh-cn">
    <link href="$!{__beat.server.contextPath}/bootstrap/css/bootstrap.min.css" rel="stylesheet">
    <link href="$!{__beat.server.contextPath}/bootstrap/datepicker/datepicker3.css" rel="stylesheet">
    <link rel="stylesheet" href="$!{__beat.server.contextPath}/bootstrap/css/App.css" type="text/css" />
    <link rel="stylesheet" href="$!{__beat.server.contextPath}/bootstrap/css/font-awesome.min.css" type="text/css" />
    
    <link rel="stylesheet" type="text/css" href="$!{__beat.server.contextPath}/css/wnl.css">
    <meta charset="UTF-8">
    
    <title>简历数据看板</title>
</head>
<body>

<div class="container-fluid">

    <div class="datacontent" id="qsContent">
        <div class="dataTit">
            <i class="mark"></i><span>求职者整体数据</span>
        </div>
           
        <div>
        <table class="table table-bordered" style="text-align: center">
            <thead>
            <tr>
                <th style="text-align: center">求职者概况</th>
                <th style="text-align: center">招聘职位UV</th>
                <th style="text-align: center">新增有效简历人数</th>
                <th style="text-align: center">新增有效简历量</th>
                <th style="text-align: center">主动投递简历量</th>
                <th style="text-align: center">主动投递简历的求职者人数</th>
                <th style="text-align: center">简历阅读次数</th>
           		<th style="text-align: center">简历下载次数</th>
            </tr>                
            </thead>
            <tbody id='totaltable'>
                #foreach($row in $tableData)
                    #if(!$row.isEmpty())
                        <tr><td>#if($velocityCount==1)昨日($!stat_date)数据#elseif($velocityCount==2)日环比#elseif($velocityCount==3)周同比#elseif($velocityCount==4)月同比#end</td>
                               #foreach($col in $row)<td>$col</td>#end
                       </tr>
                    #end
                #end    
            </tbody>
        </table>
        </div> 
    </div>  
    
    
    <div class="datacontent" id="qsContent">
        <div class="dataTit">
            <i class="mark"></i><span>企业整体数据</span>
        </div>
          
        <div>
        <table class="table table-bordered" style="text-align: center">
            <thead>
            <tr>
                <th style="text-align: center">招聘企业概况</th>
                <th style="text-align: center">简历库UV</th>
                <th style="text-align: center">新增有效职位量</th>
                <th style="text-align: center">新增有效职位企业量</th>
                <th style="text-align: center">电话咨询量</th>
                <th style="text-align: center">自主投递职位量</th>
                <th style="text-align: center">自主投递企业量</th>
            </tr>                
            </thead>
            <tbody id='totaltable'>
                #foreach($row in $tableData2)
                    #if(!$row.isEmpty())
                        <tr><td>#if($velocityCount==1)昨日($!stat_date2)数据#elseif($velocityCount==2)日环比#elseif($velocityCount==3)周同比#elseif($velocityCount==4)月同比#end</td>
                               #foreach($col in $row)<td>$col</td>#end
                       </tr>
                    #end
                #end    
            </tbody>
        </table>
        </div> 
    </div>    


	<div class="datacontent" id="qsContent">
        <div class="dataTit">
            <i class="mark"></i><span>简历整体数据</span>
        </div>
        <div class="dataShow">
            <div id='resumeOption_total' dateGrp='stat_date'>
                <form class="form-inline">
                    
                    <div class="form-group" style="width:160px;margin-left:10px">
                        <label for="city_option">城市：</label>
                        <select id="city_option" class="form-control input-sm" style="align:center; width:100px; ">
                        <option value="全国">全国</option>
                        <option value="直销">直销城市</option>
                        #foreach($!{p} in ${CityList})
                                <option value="$!{p}">$!{p}</option>
                        #end  
                        </select>
                    </div> 
           

                    <div class="form-group" style="width:160px;margin-left:10px">
                        <label for="cate_option">类别：</label>
                        <select id="cate_option" class="form-control input-sm" style="align:center; width:100px; ">
                            <option value="all">总体</option>
                            <option value="求职信息">求职信息</option>
                            <option value="找兼职">找兼职</option>
                             #foreach($!{p} in ${CateList})
                                <option value="$!{p}">$!{p}</option>
                            #end
                        </select>                     
                    </div>

					 <div class="input-group input-group-sm btn-tab" style="margin-left: 10px">
                            <select id="index_Type" class="form-control">
                            <option value="resume_add_count">新增简历量</option>
                            <option value="user_add_count">新增简历人数</option>
                        </select>
                    </div>   
                    
                    <button id="refresh_rTotal_pie_btn" type="button" class="btn btn-default form-control input-sm">刷新</button>
                    
                    <div class="form-group input-group input-group-sm" style="width: 13%;margin-left:3%">
                    	<span class="input-group-addon">
                   		<input id="time_checkbox_rTotal" type="checkbox">
                    	</span>
                    	<input id="time_input_rTotal" type="text" class="form-control input-sm"  placeholder="添加对比" disabled>
                    </div>                               
                </form>           
            </div>          
            
            <div class="row" >
				<div id="pie_1" class="col-md-5" style="height:400px"></div>
				<div id="line_1" class="col-md-7" style="height:400px"></div> 
			</div>
			
			<div class="row" style="height:50px">
			</div>
        </div>
    </div>     


	<div class="datacontent" id="qsContent">
        <div class="dataTit">
            <i class="mark"></i><span>职位整体数据</span>
        </div>
        <div class="dataShow">
            <div id='jobOption_total' dateGrp='stat_date'>
                <form class="form-inline">
                    
                    <div class="form-group" style="width:160px;margin-left:10px">
                        <label for="city_option1">城市：</label>
                        <select id="city_option1" class="form-control input-sm" style="align:center; width:100px; ">
                        <option value="全国">全国</option>
                        <option value="直销">直销城市</option>
                        #foreach($!{p} in ${CityList})
                                <option value="$!{p}">$!{p}</option>
                        #end  
                        </select>
                    </div> 
           

                    <div class="form-group" style="width:160px;margin-left:10px">
                        <label for="cate_option1">类别：</label>
                        <select id="cate_option1" class="form-control input-sm" style="align:center; width:100px; ">
                            <option value="all">总体</option>
                            <option value="全职招聘">全职招聘</option>
                            <option value="兼职招聘">兼职招聘</option>
                             #foreach($!{p} in ${CateList})
                                <option value="$!{p}">$!{p}</option>
                             #end
                        </select>                     
                    </div>

					 <div class="input-group input-group-sm btn-tab" style="margin-left: 10px">
                            <select id="index_Type1" class="form-control">
                            <option value="add_position">新增职位量</option>
                            <option value="add_position_ent">新增职位企业数</option>
                        </select>
                    </div>   
                    
                    <button id="refresh_jTotal_pie_btn" type="button" class="btn btn-default form-control input-sm">刷新</button>
                    
                    <div class="form-group input-group input-group-sm" style="width: 13%;margin-left:3%">
                    	<span class="input-group-addon">
                   		<input id="time_checkbox_jTotal" type="checkbox">
                    	</span>
                    	<input id="time_input_jTotal" type="text" class="form-control input-sm"  placeholder="添加对比" disabled>
                    </div>
                    
                                
                </form>           
            </div>          
            
            <div class="row" style=>
				<div id="pie" class="col-md-5" style="height:400px"></div>
				<div id="line" class="col-md-7" style="height:400px"></div> 
			</div>
			
			<div class="row" style="height:50px">
			</div>
        </div>
    </div>     
    

   <!--  
    <div class="datacontent" id="qsContent">
        <div class="dataTit">
            <i class="mark"></i><span>简历下载专题</span>
        </div>
        <div class="dataShow">
            <div id='Down_Option' dateGrp='stat_date'>
                <form class="form-inline">
                    
                    <div class="form-group" style="width:160px;margin-left:10px">
                        <label for="city_down_option">城市：</label>
                        <select id="city_down_option" class="form-control input-sm" style="align:center; width:100px; ">
                        <option value="全国">全国</option>
                        <option value="直销">直销城市</option>
                        #foreach($!{p} in ${CityList})
                                <option value="$!{p}">$!{p}</option>
                        #end  
                        </select>
                    </div> 
           

                    <div class="form-group" style="width:160px;margin-left:10px">
                        <label for="cate_down_option">类别：</label>
                        <select id="cate_down_option" class="form-control input-sm" style="align:center; width:100px; ">
                            <option value="all">总体</option>
                            <option value="全职招聘">全职招聘</option>
                            <option value="兼职招聘">兼职招聘</option>
                            #foreach($!{p} in ${CateList})
                                <option value="$!{p}">$!{p}</option>
                            #end
                        </select>                     
                    </div>

                    <button id="refresh_down_pie_btn" type="button" class="btn btn-default form-control input-sm">刷新</button>                   
                </form>           
            </div>          
            
            <div class="row" style=>
                <div id="down_pie_source" class="col-md-4" style="height:400px"></div>
                <div id="down_pie_fill" class="col-md-4" style="height:400px"></div>
                <div id="down_pie_transform" class="col-md-4" style="height:400px"></div>
            </div>
            
            <div class="row" style="height:50px">
            </div>
        </div>
    </div>     
    

<div class="datacontent" id="qsContent">
        <div class="dataTit">
            <i class="mark"></i><span>简历销售收入--用户类型</span>
        </div>
        <div class="dataShow">
            <div id='income_usertype_Option' dateGrp='stat_date'>
                <form class="form-inline">
                     
                     <div class="form-group" style="width:160px;margin-left:10px">
                        <label for="index_income_usertype">类别：</label>
                        <select id="index_income_usertype" class="form-control input-sm" style="align:center; width:100px; ">
                            <option value="all">总体</option>
                            <option value="会员">会员</option>   
                            <option value="非会员">非会员</option> 
                        </select>                     
                    </div>

                    <button id="refresh_income_usertype_pie_btn" type="button" class="btn btn-default form-control input-sm">刷新</button>
                                             
                </form>           
            </div>          
            
            <div class="row" style=>
                <div id="income_usertype_pie" class="col-md-5" style="height:400px"></div>
                <div id="income_usertype_bar" class="col-md-7" style="height:400px"></div> 
            </div>
            
            <div class="row" style="height:50px">
            </div>
        </div>
    </div>     


<div class="datacontent" id="qsContent">
        <div class="dataTit">
            <i class="mark"></i><span>简历销售收入--用户情况</span>
        </div>
        <div class="dataShow">
            <div id='income_userstate_Option' dateGrp='stat_date'>
                <form class="form-inline">
                                                            
                    <div class="form-group" style="width:160px;margin-left:10px">
                        <label for="index_income_userstate">类别：</label>
                        <select id="index_income_userstate" class="form-control input-sm" style="align:center; width:100px; ">
                            <option value="all">总体</option>
                            <option value="新用户">新用户</option>   
                            <option value="老用户">老用户</option>  
                        </select>                     
                    </div>

                     <button id="refresh_income_userstate_pie_btn" type="button" class="btn btn-default form-control input-sm">刷新</button>
                                                  
                </form>           
            </div>          
            
            <div class="row" style=>
                <div id="income_userstate_pie" class="col-md-5" style="height:400px"></div>
                <div id="income_userstate_bar" class="col-md-7" style="height:400px"></div> 
            </div>
            
            <div class="row" style="height:50px">
            </div>
        </div>
    </div>     


<div class="datacontent" id="qsContent">
        <div class="dataTit">
            <i class="mark"></i><span>简历销售收入--购买平台</span>
        </div>
        <div class="dataShow">
            <div id='income_purchase_Option' dateGrp='stat_date'>
                <form class="form-inline">
                                                 
                    <div class="form-group" style="width:160px;margin-left:10px">
                        <label for="index_income_purchase">类别：</label>
                        <select id="index_income_purchase" class="form-control input-sm" style="align:center; width:100px; ">
                            <option value="all">总体</option>
                            <option value="pc">pc</option>   
                            <option value="m">m</option>   
                            <option value="微信">微信</option> 
                            <option value="帮帮">帮帮</option> 
                            <option value="招聘商家版">招聘商家版</option> 
                        </select>                     
                    </div>

                    <button id="refresh_income_purchase_pie_btn" type="button" class="btn btn-default form-control input-sm">刷新</button>
                                                  
                </form>           
            </div>          
            
            <div class="row" style=>
                <div id="income_purchase_pie" class="col-md-5" style="height:400px"></div>
                <div id="income_purchase_bar" class="col-md-7" style="height:400px"></div> 
            </div>
            
            <div class="row" style="height:50px">
            </div>
        </div>
    </div>     


<div class="datacontent" id="qsContent">
        <div class="dataTit">
            <i class="mark"></i><span>简历销售收入--简历包规格</span>
        </div>
        <div class="dataShow">
            <div id='income_resumebag_Option' dateGrp='stat_date'>
                <form class="form-inline">

                    <div class="form-group" style="width:160px;margin-left:10px">
                        <label for="index_income_resumebag">类别：</label>
                        <select id="index_income_resumebag" class="form-control input-sm" style="align:center; width:100px; ">
                            <option value="all">总体</option>
                            <option value="1">1</option>   
                            <option value="5">5</option>   
                            <option value="10">10</option> 
                            <option value="20">20</option> 
                            <option value="50">50</option>  
                            <option value="100">100</option>  
                            <option value="其他">其他</option>   
                        </select>                     
                    </div>

                    <button id="refresh_income_resumebag_pie_btn" type="button" class="btn btn-default form-control input-sm">刷新</button>
                                                  
                </form>           
            </div>          
            
            <div class="row" style=>
                <div id="income_resumebag_pie" class="col-md-5" style="height:400px"></div>
                <div id="income_resumebag_bar" class="col-md-7" style="height:400px"></div> 
            </div>
            
            <div class="row" style="height:50px">
            </div>
        </div>
    </div>    


  <div class="datacontent" id="qsContent">
        <div class="dataTit">
            <i class="mark"></i><span>简历数量供应</span>
        </div>
        <div class="dataShow">
            <div id='Quantity_provision_Option' dateGrp='stat_date'>
                <form class="form-inline">

                    <label for="beginDate">时间: </label>
                    <div class="form-group input-group input-group-sm" style="width: 10%;">
                        <input id="beginDate" type="text"  class="form-control input-sm time" placeholder="选择时间" value="$!maxDate"/>
                    </div>
                    
                    <div class="form-group" style="width:160px;margin-left:10px">
                        <label for="city_quantity_option">城市：</label>
                        <select id="city_quantity_option" class="form-control input-sm" style="align:center; width:100px; ">
                        #foreach($!{p} in ${CityList})
                                <option value="$!{p}">$!{p}</option>
                        #end  
                        </select>
                    </div> 
           

                    <div class="form-group" style="width:180px;margin-left:10px">
                        <label for="cate_quantity_option">类别：</label>
                        <select id="cate_quantity_option" class="form-control input-sm" style="align:center; width:130px; ">

                            #foreach($!{p} in ${CateList})
                                <option value="$!{p}">$!{p}</option>
                            #end
                        </select>                     
                    </div>

                    <button id="refresh_quantity_chord_btn" type="button" class="btn btn-default form-control input-sm">刷新</button>  

                      <div class="btn-group btn-group-sm btn-tab" role="group" aria-label="Basic example"  style="float: right">
                        <button type="button" class="btn btn-default active btn_quantityProvision" dateGrp='stat_date' statType='day'>日</button>
                        <button type="button" class="btn btn-default btn_quantityProvision" dateGrp='week_begin' statType='week'>周</button>                       
                    </div>

                </form>           
            </div>          
            
            <div class="row" style=>
                <div id="quantity_chord_source"  style="height:350px"></div>
        
            </div>
            
            <div class="row" style="height:50px">
            </div>
        </div>
    </div>     


<div class="datacontent" id="qsContent">
        <div class="dataTit">
            <i class="mark"></i><span>企业搜索热词</span>
        </div>
        <div class="dataShow">
            <div id='Ent_word_Option' dateGrp='stat_date'>
                <form class="form-inline">

                    <label for="beginDate_entword">时间: </label>
                    <div class="form-group input-group input-group-sm" style="width: 10%;">
                        <input id="beginDate_entword" type="text"  class="form-control input-sm time" placeholder="选择时间" value="$!maxDate2"/>
                    </div>
                    
                    <div class="form-group" style="width:160px;margin-left:10px">
                        <label for="city_entword_option">城市：</label>
                        <select id="city_entword_option" class="form-control input-sm" style="align:center; width:100px; ">
                        <option value="全国">全国</option>
                        <option value="直销">直销城市</option>
                        #foreach($!{p} in ${CityList})
                                <option value="$!{p}">$!{p}</option>
                        #end  
                        </select>
                    </div> 
           

                    <div class="form-group" style="width:180px;margin-left:10px">
                        <label for="cate_entword_option">类别：</label>
                        <select id="cate_entword_option" class="form-control input-sm" style="align:center; width:130px; ">
                            <option value="全职招聘">全职招聘</option>
                         <option value="兼职招聘">兼职招聘</option>
                            #foreach($!{p} in ${CateList})
                                <option value="$!{p}">$!{p}</option>
                            #end
                        </select>                     
                    </div>

                    <button id="refresh_entword_btn" type="button" class="btn btn-default form-control input-sm">刷新</button>  

                </form>           
            </div>          
            
            <div class="row" style=>
                <div id="entword_event"  style="height:350px"></div>
        
            </div>
            
            <div class="row" style="height:50px">
            </div>
        </div>
    </div>     
 -->
<!-- 
<div class="datacontent" >
        <div class="dataTit">
            <i class="mark"></i><span>字符云</span>
        </div>
        <div class="dataShow">
            <div id='resumeOption_zifuyun' dateGrp='stat_date'>
                <form class="form-inline">
                    <label for="beginDate_zifuyun">时间: </label>
                    <div class="form-group input-group input-group-sm" style="width: 13%;">
                        <input id="beginDate_zifuyun" type="text"  class="form-control input-sm time" placeholder="选择起始时间" value="$!{maxDate2}"/>
                    </div>
                    
                     <div class="form-group" style="width:160px;margin-left:10px">
                        <label for="city_zifuyun_option">城市：</label>
                        <select id="city_zifuyun_option" class="form-control input-sm" style="align:center; width:100px; ">
                            <option value="全国">全国</option>
                            <option value="直销">直销城市</option>
                            #foreach($!{p} in ${CityList})
                                    <option value="$!{p}">$!{p}</option>
                            #end  
                        </select>
                    </div> 
           

                    <div class="form-group" style="width:180px;margin-left:10px">
                        <label for="cate_zifuyun_option">类别：</label>
                        <select id="cate_zifuyun_option" class="form-control input-sm" style="align:center; width:130px; ">
                            <option value="全职招聘">全职招聘</option>
                            <option value="找兼职">找兼职</option>
                            #foreach($!{p} in ${CateList})
                                <option value="$!{p}">$!{p}</option>
                            #end
                        </select>                     
                    </div>

                      <button id="refresh_zifuyun_btn" type="button" class="btn btn-default form-control input-sm">刷新</button>
                </form>           
            </div>
            
            <div id="zifuCloud" style="height:400px"></div>
        </div>
    </div>  -->   
    
</div>
</body>
<script src="$!{__beat.server.contextPath}/bootstrap/jquery.js"></script>

<link rel="stylesheet" href="$!{__beat.server.contextPath}/bootstrap/libs/jquery-ui/jquery-ui-1.9.2.custom.css" type="text/css" /> 
<link type="text/css" href="$!{__beat.server.contextPath}/bootstrap/libs/jquery-ui/jquery.multiselect.css" rel="stylesheet" />
<script src="$!{__beat.server.contextPath}/bootstrap/libs/jquery-ui/jquery-ui-1.9.2.custom.min.js"></script>
<script type="text/javascript" src="$!{__beat.server.contextPath}/bootstrap/libs/jquery-ui/jquery.multiselect.js"></script>


<script src="$!{__beat.server.contextPath}/bootstrap/js/libs/bootstrap.js"></script>
<script src="$!{__beat.server.contextPath}/bootstrap/datepicker/bootstrap-datepicker.js"></script>
<script src="$!{__beat.server.contextPath}/bootstrap/datepicker/nongLiDate.js"></script>
<script src="$!{__beat.server.contextPath}/bootstrap/datepicker/locales/bootstrap-datepicker.zh-CN.js"></script>
<script src="$!{__beat.server.contextPath}/echarts2/source/echarts.js"></script>
<!-- <script src="$!{__beat.server.contextPath}/js/wnl.js"></script> -->
<script src="$!{__beat.server.contextPath}/bootstrap/js/App.js"></script>
<script type="text/javascript">
    var businessName = "$!{businessName}";
    var dayMap={1:"周一",2:"周二",3:"周三",4:"周四",5:"周五",6:"周六",0:"周日"};
	var datepicker_op={
        format: "yyyy-mm-dd",
        clearBtn: false,
        language: "zh-CN",
        autoclose: true,
        todayHighlight: true,
        minViewMode:0,
		orientation: "top left"
    };

	function getDate(yyyymmdd){
        if(yyyymmdd.length==10){        //yyyy-MM-dd
            return Date.parse(yyyymmdd.substr(0,4)+'/'+yyyymmdd.substr(5,2)+'/'+yyyymmdd.substr(8,2));
        }else if(yyyymmdd.length==8){
            return Date.parse(yyyymmdd.substr(0,4)+'/'+yyyymmdd.substr(4,2)+'/'+yyyymmdd.substr(6,2));
        }else if(yyyymmdd.length==6){
            return Date.parse(yyyymmdd.substr(0,4)+'/'+yyyymmdd.substr(4,2));
        }
    }

    //获取星期几 dayDate 的格式为 yyyy-MM-dd
    function getWeekDay(dayDate){
        var jsDate = new Date(Date.parse(dayDate.replace(/\-/g,'/')));
        var weekNumber = jsDate.getDay();
        return dayMap[weekNumber];
    }

    function setDatePicker(ec,dateGrp,input){
        if('week_begin'==dateGrp){
        }else if('month_num'==dateGrp){
            datepicker_op.minViewMode=1;
            datepicker_op.format='yyyy-mm';
        }else{
            datepicker_op.minViewMode=0;
            datepicker_op.format='yyyy-mm-dd';
        }
        input.datepicker('remove');
        input.datepicker(datepicker_op);
        //获取显示的日期数组
        var days_show=ec.getShowDays();
        var days_all=ec.getAllDays();
        //设置时间可选范围
        input.datepicker('setStartDate',new Date(getDate(days_all[0])));
        input.datepicker('setEndDate',new Date(getDate(days_all[days_all.length-days_show.length])));
    }

    function changeDateGrp(item){
        var dateGrpVal = $(item).attr('dateGrp');
        var curDiv = $(item).closest('div[dateGrp]');
        $(curDiv).attr('dateGrp',dateGrpVal);
    }

    function changeIndex(item){
        var indexVal = $(item).val();
        var curDiv = $(item).closest('div[dateGrp]');
        $(curDiv).attr('indexType',indexVal);
    }

    $('.btn-tab button').click(function(e){
        $(this).addClass('active');
        $(this).siblings('button').each(function(){
            $(this).removeClass('active');
        });
    });

    // 路径配置
    require.config({paths: {echarts: "$!{__beat.server.contextPath}/echarts2/dist",dashboard: "$!{__beat.server.contextPath}/js/resume"}});
	
	var charts = [];
	
    //简历整体数据
    require(['dashboard/totaldata'],function(totalEC){
        charts.push(totalEC);
        totalEC.showPie();
    });
    
    //职位整体数据  
    require(['dashboard/total_position_data'],function(totalEC){
        charts.push(totalEC);
        totalEC.showPie();
    });


    // //简历下载专题   
    // require(['dashboard/resume_down'],function(totalEC){
    //     charts.push(totalEC);
    //     totalEC.showPie();
    // });


    // //简历销售收入 --用户类型 
    // require(['dashboard/resume_income_usertype'],function(totalEC){
    //     charts.push(totalEC);
    //     totalEC.showPie();
    // });

    // //简历销售收入 --用户情况
    // require(['dashboard/resume_income_userstate'],function(totalEC){
    //     charts.push(totalEC);
    //     totalEC.showPie();
    // });

    //  //简历销售收入 --购买平台
    // require(['dashboard/resume_income_purchase'],function(totalEC){
    //     charts.push(totalEC);
    //     totalEC.showPie();
    // });

    // //简历销售收入 --简历包规格
    // require(['dashboard/resume_income_resumebag'],function(totalEC){
    //     charts.push(totalEC);
    //     totalEC.showPie();
    // });


    // //简历数量供应  
    // require(['dashboard/resume_quantity'],function(totalEC){
    //     charts.push(totalEC);
    //     totalEC.showChord();
    // });
    

    //  //河流图
    // require(['dashboard/ent_word'],function(totalEC){
    //        charts.push(totalEC);
    //        totalEC.show();
    //    });


    // // 字符云o
    //  require(['dashboard/zifu_cloud'],function(totalEC){
    //     charts.push(totalEC);
    //     totalEC.show();
    // });
     

	//格式化输出数字
	function format_number(n){
        var b=parseInt(n).toString(); 
        var len=b.length; 
        if(len<=3){return b;} 
        var r=len%3; 
        return r>0?b.slice(0,r)+","+b.slice(r,len).match(/\d{3}/g).join(","):b.slice(r,len).match(/\d{3}/g).join(","); 
    };

    $('#totaltable tr').each(function(row_index,row_element){
         if(row_index==0||row_index==4){
    	       $(row_element).children().each(function(col_index,col_element){
    			   if(isNaN($(col_element).text())){return}
    			   $(col_element).text(format_number($(col_element).text()));
    		   });		   
    		   return;
           }
       $(row_element).children().each(function(col_index,col_element){
      		if(isNaN($(col_element).text())){return}
       		   $(col_element).text(''+$(col_element).text()+"%");
          	if($(col_element).text().indexOf('-')!=-1){
                $(col_element).addClass('text-success');
    			$(col_element).append('<i class="downi"></i>');
            }else{
                $(col_element).addClass('text-danger');
    			$(col_element).append('<i class="upi"></i>');
            }
       })
    });

 	$(window).resize(function(){
        $.each(charts,function(i,n){
            n.resize();
        });
    });

</script>
</html>